<!DOCTYPE html>
<html  lang="zh" xmlns:th="http://www.thymeleaf.org">
<head>
	<meta charset="utf-8">
	<meta name="viewport" content="width=device-width, initial-scale=1.0">
	<meta name="renderer" content="webkit">
	<link rel="icon" href="https://v3.bootcss.com/favicon.ico"/>

	<link href="https://cdn.bootcss.com/bootstrap/3.3.7/css/bootstrap.css" rel="stylesheet">
</head>
<body style="background-color: #f1f1f1; padding-bottom: 0">
	<div th:insert="~{header :: nav}"></div>
	<div class="container" style="margin-top: 60px">
		<div class="row" style="margin-top: 100px">
			<div class="col-md-6 col-md-offset-3">
				<div class="panel panel-primary">
					<div class="panel-heading">
						<h3 class="panel-title"><span class="glyphicon glyphicon-console"></span> Login</h3>
					</div>
					<div class="panel-body">
						<form id="form_signin" th:action="@{/login}" method="post">
							<div th:if="${loginError} != null">
								<div  class="alert alert-danger col-sm-offset-2 col-sm-10" role="alert" th:text="${loginError}"></div>
							</div>
							<div class="form-group" style="margin-top: 30px">
								<div class="input-group col-md-6 col-md-offset-3">
									<div class="input-group-addon"><span class="glyphicon glyphicon-user"></span></div>
									<input type="text" class="form-control" name="username" id="ipt_username" placeholder="用户名">
								</div>
							</div>
							<div class="form-group ">
								<div class="input-group col-md-6 col-md-offset-3">
									<div class="input-group-addon"><span class="glyphicon glyphicon-lock"></span></div>
									<input type="password" maxlength="20" name="password" class="form-control notEmpty" id="ipt_password" placeholder="密码">
								</div>
							</div>
							<br>
							<div class="form-group">
								<div class="col-sm-offset-2 col-sm-10">
									<div class="checkbox">
										<label>
											<input class="form_control" type="checkbox" id="checkbox_rememberme" value="true" name="rememberMe">记住我
										</label>
									</div>
								</div>
							</div>

							<div class="form-group">
								<!--<div class="col-sm-offset-2 col-sm-10">-->
									<!--<button type="button" onclick="signin()" class="btn btn-lg btn-primary btn-block">登录</button>-->
								<!--</div>-->
								<div class="input-group col-md-12 col-xs-12 ">
									<button type="submit" class="btn btn-primary btn-block">登录</button>
									<a href="https://graph.qq.com/oauth2.0/authorize?response_type=code&client_id=101543916&redirect_uri=http://www.cicoding.cn/login/qq&state=test" class="btn btn-primary btn-block">QQ登录</a>
								</div>
							</div>
						</form>
					</div>

					<!--<h2>-->
						<!--<div th:if="${user!=null}">-->
						<!--<span th:text="${user.username}"></span>-->
						<!--</div>-->
					<!--</h2>-->
				</div>
			</div>
		</div>
	</div>
</body>
<script th:src="@{/js/jquery/jquery.min.js}"></script>
<script>
    function signin() {
        $("#form_signin").submit();
    }
</script>
</html>
